﻿<Controls:MetroWindow x:Class="ImageGallery.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:ImageGallery"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
        Title="MainWindow" Height="699" Width="1379" WindowState="Maximized">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>

    <Grid Name="mainGrid">
        <Grid.RowDefinitions>
            <RowDefinition Height="60"></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition Width="0*"/>
        </Grid.ColumnDefinitions>

        <WrapPanel Name="folderPicker" Grid.Row="0" >
            <Label Name="folderPath" Content="Select Folder" FontSize="22" Width="800"></Label>
            <Button Name="chooseFolder" Content="Browse..." Click="chooseFolder_Click_1" FontSize="30" Margin="5"></Button>
        </WrapPanel>
        
        <Image Name="mainImage" Grid.Row="1" Stretch="Uniform" Margin="10" ></Image>
        <Image Name="bookmarkImage" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Top" Width="50" Height="50" />

        <WrapPanel Grid.Row="1" Name="imageList" ScrollViewer.VerticalScrollBarVisibility="Auto" Margin="0,50,0,0">
            <ItemsControl ItemsSource="{Binding Images}">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Border BorderThickness="2" Margin="10" Background="Black">
                            <Image Source="{Binding ImageUri}" ToolTip="{Binding Label}" Height="200" Width="200" />
                        </Border>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <WrapPanel />
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
            </ItemsControl>
        </WrapPanel>
    </Grid>
</Controls:MetroWindow>
